#include  <stdio.h>

int main(int argc, char *argv[])
{
	float length;
	while( true )
	{
		float sum = 0.0;
		scanf("%f",&length);
		if(length == 0.0)
			break;

		for( int i = 1;  ; ++i )
		{
			sum += 1.0/(i+1);
			if(sum >= length)
			{
				printf("%d card(s)\n",i);
				break;
			}
		}
	}
}
